<script setup lang="ts">
import aiSiderInput from "./aiSiderInput.vue";

import { useAppStore } from "@/store";
import { ref } from "vue";
import { useBasicLayout } from "@/hooks/useBasicLayout";

import chatIndex from "@/views/generateArea/index.vue";

var pinyin = ref({});
var yuyinmergevideourl = ref("");
var finalvideourl = ref("");

const drawSent = (obj: any) => {
  console.log(obj);
  if (obj.type == "pinyinCreate") pinyin.value = obj.data;
  if (obj.type == "yuyinmergevideo") yuyinmergevideourl.value = obj.data;
  if (obj.type == "finalvideoSent") finalvideourl.value = obj.data;
};
</script>
<template>
  <div class="flex" style="height: 100%">
    <div>
      <aiSiderInput
        @drawSent="drawSent"
        :button-disabled="false"
      ></aiSiderInput>
    </div>

    <main class="flex-1 overflow-hidden">
      <chatIndex
        :pinyin="pinyin"
        :yuyinmergevideourl="yuyinmergevideourl"
        :finalvideourl="finalvideourl"
      ></chatIndex>
    </main>
  </div>
</template>